subroutine calculateWK(vertex2D,nVer2D,nInCat2D,vertex3D,params,nVer3D,&
    nInCat3D,igT,jgT,ggT,ig,jg,ggu,ggl,di,f,l1,v1,v2,v3,v4,v5,ggl2,ggu2,di2,&
    igT3D,jgT3D,ggT3D,l13d,ig3D,jg3D,igEarth,jgEarth,vn2d_dat,vn3d_dat,va_dat,&
    v0_dat,zLayers,xObjects,yObjects,zObjects,numbersObjects,nLayers,nObjects,&
    nXObjects,nYObjects,nZObjects,wk2d_dat,wk3d_dat,sigmaLayers,sigmaObjects,&
    areaObjects,areaType,layerType,nAreaObjects,vnRZ,vnXYZ,va,v0,wnRZ,wnXYZ,wa)
    common /dim2D/nodesCount2D,elemsCount2D,nodesBoundCount2D,nodesTermCount2D,&
    m2D,mTerm2d,nodesNotTermCount2D
    common /dim3D/nodesCount3D,elemsCount3D,nodesBoundCount3D,edgesTermCount3D,&
    edgesNotTermCount3D,edgesCount3D,nodesTermCount3D,m3D,mTerm3d,nodesNotTermCount3D
    common /commonInfo/ eps2d,eps3d,eps3dNS,radiusRED,maxiter,typeTask,nt,nMaterials,calcWK,calcVP
    common /dimEarth/nodesNotTermEarth,mEarth
    common /files_common/ infite_0,num_slae,log_txt,typeTask_txt
    integer elemsCount2D,edgesTermCount3D,edgesNotTermCount3D,edgesCount3D,elemsCount3D
    integer typeTask,calcWK,calcVP,typeTask_txt,vn2d_dat,vn3d_dat,va_dat,v0_dat,&
    wk2d_dat,wk3d_dat,areaObjects,areaType
    real*8 eps2d,eps3d,eps3dNS,radiusRED,vertex2D,vertex3D,params,ggT,ggu,ggl,di,&
    v1,v2,v3,v4,v5,ggl2,ggu2,di2,vnRZ,vnXYZ,ggT3D,va,f,v0,zLayers,xObjects,yObjects,&
    zObjects,sigmaLayers,sigmaObjects,wnRZ,wnXYZ,wa
    dimension vertex2D(2,nodesCount2D),nVer2D(4,elemsCount2D),nInCat2D(elemsCount2D),&
    vertex3D(3,nodesCount3D),params(2,nMaterials),nVer3D(14,elemsCount3D),&
    nInCat3D(elemsCount3D),igT(nodesTermCount2D+1),jgT(mTerm2d),ggT(mTerm2d),&
    ig(nodesNotTermCount2D+1),jg(m2d),ggu(m3d),ggl(m3d),di(nodesNotTermCount3D),&
    l1(nodesBoundCount2D),v1(nodesNotTermCount3D),v2(nodesNotTermCount3D),&
    v3(nodesNotTermCount3D),v4(nodesNotTermCount3D),v5(nodesNotTermCount3D),&
    ggl2(m3d),ggu2(m3d),di2(nodesNotTermCount3D),vnRZ(nodesCount2D),vnXYZ(nodesCount3D),&
    igT3D(nodesTermCount3D+1),jgT3D(mTerm3d),ggT3D(mTerm3d),l13d(nodesBoundCount3D),&
    va(nodesCount3D),ig3D(nodesNotTermCount3D+1),jg3D(m3d),f(nodesNotTermCount3D),&
    v0(nodesCount3D),igEarth(nodesNotTermEarth+1),jgEarth(mEarth),zLayers(nLayers),&
    xObjects(nXObjects),yObjects(nYObjects),zObjects(nZObjects),numbersObjects(6,nObjects),&
    sigmaLayers(nLayers),sigmaObjects(nObjects),areaObjects(nAreaObjects),&
    areaType(2,nLayers+nObjects),wnRZ(nodesCount2D),wnXYZ(nodesCount3D),wa(nodesCount3D)

    call calculateInitialField(vertex2D,nVer2D,nInCat2D,vertex3D,params,nVer3D,&
    nInCat3D,igT,jgT,ggT,ig,jg,ggu,ggl,di,f,l1,v1,v2,v3,v4,v5,ggl2,ggu2,di2,&
    vnRZ,vnXYZ,va,v0,igT3D,jgT3D,ggT3D,l13d,ig3D,jg3D,igEarth,jgEarth,vn2d_dat,&
    vn3d_dat,va_dat,v0_dat,log_txt,layerType,nObjects)

    call calculateSecondaryField(vertex2D,nVer2D,nInCat2D,params,igT,jgT,&
    ggT,ig,jg,ggu,ggl,di,f,l1,v1,v2,v3,v4,v5,ggl2,ggu2,di2,vertex3D,nVer3D,&
    nInCat3D,igT3D,jgT3D,ggT3D,log_txt,zLayers,xObjects,yObjects,zObjects,&
    numbersObjects,nLayers,nObjects,nXObjects,nYObjects,nZObjects,wk2d_dat,&
    wk3d_dat,sigmaLayers,sigmaObjects,areaObjects,areaType,layerType,&
    nAreaObjects,l13d,ig3D,jg3D,igEarth,jgEarth,vnRZ,vnXYZ,va,v0,wnRZ,wnXYZ,wa)

end
!*************************************************************************
!*************************************************************************
!*************************************************************************